package cn.iocoder.yudao.module.ai.dal.mysql.operationreceivemessage;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.ai.dal.dataobject.operationreceivemessage.OperationReceiveMessageDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.ai.controller.admin.operationreceivemessage.vo.*;

/**
 * 终端推送消息日志 Mapper
 *
 * @author 侯俊青
 */
@Mapper
public interface OperationReceiveMessageMapper extends BaseMapperX<OperationReceiveMessageDO> {

    default PageResult<OperationReceiveMessageDO> selectPage(OperationReceiveMessagePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OperationReceiveMessageDO>()
                .eqIfPresent(OperationReceiveMessageDO::getType, reqVO.getType())
                .betweenIfPresent(OperationReceiveMessageDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(OperationReceiveMessageDO::getSuplierId, reqVO.getSuplierId())
                .betweenIfPresent(OperationReceiveMessageDO::getReceiveTime, reqVO.getReceiveTime())
                .eqIfPresent(OperationReceiveMessageDO::getHandleStatus, reqVO.getHandleStatus())
                .eqIfPresent(OperationReceiveMessageDO::getHandleMsg, reqVO.getHandleMsg())
                .eqIfPresent(OperationReceiveMessageDO::getFromIp, reqVO.getFromIp())
                .eqIfPresent(OperationReceiveMessageDO::getOtherParam, reqVO.getOtherParam())
                .eqIfPresent(OperationReceiveMessageDO::getParamAppid, reqVO.getParamAppid())
                .eqIfPresent(OperationReceiveMessageDO::getParamData, reqVO.getParamData())
                .eqIfPresent(OperationReceiveMessageDO::getParamTranscode, reqVO.getParamTranscode())
                .betweenIfPresent(OperationReceiveMessageDO::getParamReqtime, reqVO.getParamReqtime())
                .eqIfPresent(OperationReceiveMessageDO::getParamSign, reqVO.getParamSign())
                .eqIfPresent(OperationReceiveMessageDO::getDataDecrypt, reqVO.getDataDecrypt())
                .eqIfPresent(OperationReceiveMessageDO::getCompanyId, reqVO.getCompanyId())
                .orderByDesc(OperationReceiveMessageDO::getId));
    }

}